Synchronous communication method and terminal

ABSTRACT

A synchronous communication method is provided. The method includes: obtaining, by a first terminal, first configuration information, where the first configuration information includes a first parameter; determining, by the first terminal according to a global navigation satellite system (GNSS) clock, a transmission timeslot corresponding to a current moment in a device-to-device (D2D) communications system; determining, by the first terminal according to the transmission timeslot and the first parameter, whether the current moment is a synchronization-information-sending moment; if the current moment is the synchronization-information-sending moment, sending, by the first terminal, sidelink synchronization information at the synchronization-information-sending moment, where the sidelink synchronization information carries indication information, the sidelink synchronization information is used to synchronize a second terminal with the first terminal, and the indication information is used to indicate, to the second terminal, that the first terminal is a synchronization source that uses the GNSS clock.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2015/086727, filed on Aug. 12, 2015, which is hereby incorporatedby reference in their entireties.

TECHNICAL FIELD

The present invention relates to the communications field, and inparticular, to a synchronous communication method and a terminal.

BACKGROUND

With the continuous development of society, automobiles becomeincreasingly popular. Driving makes it convenient for people to travel,but also has negative impact on human society. A rapid increase in aquantity of vehicles causes a series of problems such as urban trafficcongestion, frequent traffic accidents, and environmental degradation.According to statistics, nearly 200,000 traffic accidents occur in Chinain 2013 with a death toll of 58,000 and a direct economic loss of 1.04billion yuan. A perfect intelligent transportation system (ITS) isdesired from many angles such as personal safety, traffic efficiency,environmental protection, and economic benefits. Currently, the ITS hasnaturally become a focus of global attention.

At present, a vehicle may obtain information about road conditions orreceive an information service in time by means of vehicle-to-vehicle(V2V) communication or vehicle-to-infrastructure (V2I) communication.Specifically, the vehicle may broadcast information such as a vehiclespeed, a heading direction, and a specific location of the vehicle andinformation about whether brakes are slammed on to a surrounding vehicleby means of V2V communication. A driver can better know trafficconditions beyond a line of sight after obtaining the information, so asto predict and avoid a dangerous situation. During V2I communication, inaddition to exchange of the foregoing safety information, roadsideinfrastructure may further provide the vehicle with all kinds of serviceinformation and an access to a data network. Functions such aselectronic toll collection and in-vehicle entertainment greatly improvetraffic intelligence. A network used by V2V/V2I communication isreferred to as the Internet of Vehicles.

Long Term Evolution (LTE) is a mainstream wireless communicationstechnology at present. A device-to-device (D2D) technology is consideredas an important characteristic and is standardized in the 3rd GenerationPartnership Project (third Generation Partnership Project, 3GPP) LTER12, and supports direct communication between user terminals.Considering that a V2V/V2I communication scenario also belongs toterminal direct communication, the D2D technology may be used forV2V/V2I service transmission.

In an existing LTE R12 D2D communications technology, if a terminal canfind a cell on a D2D transmission carrier frequency of interest, it isconsidered that the terminal is within a network coverage area.Otherwise, it is considered that the terminal is beyond a networkcoverage area. The terminal within the network coverage area implementssynchronization by using a synchronization signal of a base station. Theterminal beyond the network coverage area needs to search for asurrounding synchronization source before performing D2D communication.If a synchronization source satisfying a signal quality requirement canbe detected around, the terminal synchronizes with the synchronizationsource. Otherwise, the terminal serves as a synchronization source todetermine a synchronization signal sending moment and send asynchronization signal at the corresponding moment. If a receivingterminal finds multiple synchronization sources, on the premise that themultiple synchronization sources satisfy the signal quality requirement,priorities for accessing different synchronization sources aredistinguished as follows: A synchronization source within the networkcoverage area has priority over a synchronization source beyond thenetwork coverage area.

In the prior art, when a terminal beyond a coverage area sends asynchronization signal as a synchronization source, differentsynchronization sources are probably asynchronized, and asynchronizationbetween two synchronization sources causes asynchronization betweenreceiving terminals covered by the two synchronization sources.Consequently, communication between the two receiving terminals isaffected, and a problem of inability to communicate with each other or amiss in reception may occur, severely affecting communicationperformance.

SUMMARY

Embodiments of the present invention provide a synchronous communicationmethod, so as to avoid resource allocation misalignment and acommunication failure that are caused by asynchronization, and improvetransmission performance.

In view of this, a first aspect of the embodiments of the presentinvention provides a synchronous communication method, including:

obtaining, by a first terminal, first configuration information, wherethe first configuration information includes a first parameter;

determining, by the first terminal according to a global navigationsatellite system GNSS clock, a transmission timeslot corresponding to acurrent moment in a device-to-device D2D communications system;

determining, by the first terminal according to the transmissiontimeslot and the first parameter, whether the current moment is asynchronization information sending moment; and

if the current moment is the synchronization information sending moment,sending, by the first terminal, sidelink synchronization information atthe synchronization information sending moment, where the sidelinksynchronization information carries indication information, the sidelinksynchronization information is used to synchronize a second terminalwith the first terminal, and the indication information is used toindicate, to the second terminal, that the first terminal is asynchronization source that uses the GNSS clock.

With reference to the first aspect of the present invention, in a firstimplementation of the first aspect of the present invention, thesidelink synchronization information includes a sidelink synchronizationsignal SLSS.

With reference to the first implementation of the first aspect of thepresent invention, in a second implementation of the first aspect of thepresent invention, the SLSS includes a primary sidelink synchronizationsignal PSSS and a secondary sidelink synchronization signal SSSS, thePSSS and/or the SSSS include/includes a dedicated sequence, and thededicated sequence is the indication information.

With reference to the first implementation of the first aspect of thepresent invention, in a third implementation of the first aspect of thepresent invention, the SLSS includes a primary sidelink synchronizationsignal PSSS and a secondary sidelink synchronization signal SSSS; thePSSS includes a first dedicated sequence, and the first dedicatedsequence is the indication information; the SSSS includes a seconddedicated sequence, the second dedicated sequence includes targetindication information, and the target indication information is used toindicate, to the second terminal, a priority of the first terminal insynchronization sources that use the GNSS clock.

With reference to the third implementation of the first aspect of thepresent invention, in a fourth implementation of the first aspect of thepresent invention, the target information includes a type of a GNSStechnology used by the first terminal, or synchronization precision ofthe GNSS clock used by the first terminal, or a priority identifier.

With reference to the first aspect of the present invention, in a fifthimplementation of the first aspect of the present invention, thesidelink information includes a sidelink master information blockMIB-SL, and the MIB-SL includes the indication information.

With reference to the first aspect of the present invention, in a sixthimplementation of the first aspect of the present invention, a priorityof the synchronization source that uses the GNSS clock is higher than apriority of a synchronization source that does not use the GNSS clock;or

a priority of the synchronization source that uses the GNSS clock ishigher than a priority of a synchronization source beyond networkcoverage that does not use the GNSS clock; or

a priority of the synchronization source that uses the GNSS clock ishigher than a priority of a synchronization source beyond networkcoverage that does not use the GNSS clock and a priority of a cellwithin network coverage; or

a priority of the synchronization source that uses the GNSS clock ishigher than a priority of a synchronization source beyond networkcoverage that does not use the GNSS clock but lower than a priority of acell within network coverage.

With reference to any one of the first aspect of the present inventionor the first to the sixth implementations of the first aspect of thepresent invention, in a seventh implementation of the first aspect ofthe present invention, the corresponding transmission timeslot in theD2D communications system is a frame number and/or a subframe number.

With reference to any one of the first implementation to the fourthimplementation of the first aspect of the present invention, in aneighth implementation of the first aspect of the embodiments of thepresent invention, the sidelink synchronization information furtherincludes an MIB-SL, and the MIB-SL includes information about thetransmission timeslot, to align timeslots of the second terminal and thefirst terminal.

With reference to any one of the first aspect of the present inventionor the first to the sixth implementations of the first aspect of thepresent invention, in a ninth implementation of the first aspect of thepresent invention, before the determining, by the first terminalaccording to a global navigation satellite system GNSS clock, atransmission timeslot corresponding to a current moment in adevice-to-device D2D communications system, the method includes:

obtaining, by the first terminal, second configuration information; and

the determining, by the first terminal according to a global navigationsatellite system GNSS clock, a transmission timeslot corresponding to acurrent moment in a device-to-device D2D communications system includes:

determining, by the first terminal according to the GNSS clock and thesecond configuration information, the transmission timeslotcorresponding to the current moment in the D2D communications system.

With reference to the ninth implementation of the first aspect of thepresent invention, in a tenth implementation of the first aspect of thepresent invention, the obtaining, by the first terminal, secondconfiguration information includes:

obtaining, by the first terminal, the second configuration informationin a pre-configuration manner; or

when the first terminal is within network coverage, obtaining, by thefirst terminal, the second configuration information by receiving systembroadcast information sent by a base station; or

when the first terminal is within network coverage, obtaining, by thefirst terminal, the second configuration information by receiving radioresource control RRC signaling sent by a base station; or

obtaining, by the first terminal, the second configuration informationaccording to a preset protocol.

With reference to the ninth implementation of the first aspect of thepresent invention, in an eleventh implementation of the first aspect ofthe present invention, the second configuration information includes asecond parameter; and

the determining, by the first terminal according to the GNSS clock andthe second configuration information, the transmission timeslotcorresponding to the current moment in the D2D communications systemincludes:

determining, by the first terminal, the current moment according to theGNSS clock; and

calculating, by the first terminal, the transmission timeslot accordingto the current moment and the second parameter in accordance with apreset calculation rule.

With reference to the eleventh implementation of the first aspect of thepresent invention, in a twelfth implementation of the first aspect ofthe present invention, the second parameter includes an initialreference moment; and

the calculating, by the first terminal, the transmission timeslotaccording to the current moment and the second parameter in accordancewith a preset calculation rule includes:

calculating, by the first terminal, a difference between the currentmoment and the initial reference moment; and

calculating, by the first terminal according to the preset calculationrule and the difference, a frame number and a subframe number thatcorrespond to the current moment in the D2D communications system.

With reference to the twelfth implementation of the first aspect of thepresent invention, in a thirteenth implementation of the first aspect ofthe present invention, the first terminal calculates the frame numberDFN_(t) by using the following formula:

DFN_(t)=(a*T _(duration))mod K ₁, where

K₁ is a length of a frame period, T_(duration) is the difference, a is afirst scale parameter, and the first scale parameter is used to align atime unit of the difference with a frame length unit.

With reference to the twelfth or the thirteenth implementation of thefirst aspect of the present invention, in a fourteenth implementation ofthe first aspect of the present invention, the first terminal calculatesthe subframe number suframe_(t) by using the following formula:

suframe_(t)=(b*T _(duration))mod K ₂, where

K₂ is a length of a subframe period, b is a second scale parameter, thesecond scale parameter is used to align the time unit of the differencewith a subframe length unit, and T_(duration) is the difference.

A second aspect of the embodiments of the present invention provides asynchronous communication method, including:

obtaining, by a second terminal, sidelink synchronization informationsent by a first terminal, where the sidelink synchronization informationcarries indication information; and

determining, by the second terminal according to the indicationinformation, that the first terminal is a synchronization source thatuses a GNSS clock, and synchronizing with the first terminal accordingto the sidelink synchronization information.

With reference to the second aspect of the present invention, in a firstimplementation of the second aspect of the present invention, thesidelink synchronization information includes a sidelink synchronizationsignal SLSS, and the SLSS includes a primary synchronization signal PSSSand a secondary synchronization signal SSSS; and

the determining, by the second terminal according to the indicationinformation, that the first terminal is a synchronization source thatuses a GNSS clock includes:

parsing, by the second terminal, the PSSS and/or the SSSS to obtain adedicated sequence, where the dedicated sequence is used to indicatethat the first terminal is the synchronization source that uses the GNSSclock; and

determining, by the second terminal according to the dedicated sequence,that the first terminal is the synchronization source that uses the GNSSclock.

With reference to the second aspect of the present invention, in asecond implementation of the second aspect of the present invention, thesidelink includes a sidelink synchronization signal SLSS, and the SLSSincludes a primary synchronization signal PSSS and a secondarysynchronization signal SSSS;

the determining, by the second terminal according to the indicationinformation, that the first terminal is a synchronization source thatuses a GNSS clock includes:

parsing, by the second terminal, the PSSS to obtain a first dedicatedsequence, where the first dedicated sequence is used to indicate thatthe first terminal is the synchronization source that uses the GNSSclock; and

determining, by the second terminal according to the first dedicatedsequence, that the first terminal is the synchronization source thatuses the GNSS clock; and

the synchronizing, by the second terminal, with the first terminalaccording to the sidelink synchronization information includes:

when there are multiple first terminals, parsing, by the secondterminal, the SSSS to obtain the second dedicated sequence, where thesecond dedicated sequence includes target indication information, andthe target indication information is used to indicate a priority of thefirst terminal in synchronization sources that use the GNSS clock;

determining, by the second terminal, a synchronization source priorityof each first terminal according to the second dedicated sequence; and

synchronizing, by the second terminal, with a first terminal whosesynchronization source priority is the highest in the multiple firstterminals.

With reference to the second implementation of the second aspect of thepresent invention, in a third implementation of the second aspect of thepresent invention, the target information includes a type of a GNSStechnology used by the first terminal, or synchronization precision ofthe GNSS clock used by the first terminal, or a priority identifier.

With reference to the second aspect of the present invention, in afourth implementation of the second aspect of the present invention, thesidelink synchronization information includes a sidelink masterinformation block MIB-SL; and

the determining, by the second terminal according to the indicationinformation, that the first terminal is a synchronization source thatuses a GNSS clock includes:

parsing, by the second terminal, the MIB-SL to obtain the indicationinformation, where the indication information is used to indicate thatthe first terminal is the synchronization source that uses the GNSSclock; and

determining, by the second terminal according to the indicationinformation, that the first terminal is the synchronization source thatuses the GNSS clock.

With reference to the first implementation of the second aspect of thepresent invention, in a fifth implementation of the second aspect of thepresent invention, the sidelink synchronization information furtherincludes an MIB-SL, and the MIB-SL includes a transmission timeslot thatis determined by the first terminal according to the GNSS clock and thatcorresponds to a current moment in a D2D system; and

the synchronizing, by the second terminal, with the first terminalaccording to the sidelink synchronization information sent by the firstterminal includes:

obtaining, by the second terminal, a timeslot boundary of the firstterminal according to the SLSS;

aligning, by the second terminal, a timeslot boundary of the secondterminal with the timeslot boundary of the first terminal;

determining, by the second terminal according to the MIB-SL, thetransmission timeslot that is determined by the first terminal accordingto the GNSS clock and that corresponds to the current moment in thedevice-to-device D2D system; and

aligning, by the second terminal, a transmission timeslot of the secondterminal with the transmission timeslot of the first terminal.

With reference to the fifth implementation of the second aspect of thepresent invention, in a sixth implementation of the second aspect of thepresent invention, the transmission timeslot is a subframe number and/ora frame number.

With reference to any one of the second aspect of the present inventionor the first to the sixth implementations of the second aspect of thepresent invention, in a seventh implementation of the second aspect ofthe present invention, a priority of the synchronization source thatuses the GNSS clock is higher than a priority of a synchronizationsource that does not use the GNSS clock; or

a priority of the synchronization source that uses the GNSS clock ishigher than a priority of a synchronization source beyond networkcoverage that does not use the GNSS clock; or

a priority of the synchronization source that uses the GNSS clock ishigher than a priority of a synchronization source beyond networkcoverage that does not use the GNSS clock and a priority of a cellwithin network coverage; or

a priority of the synchronization source that uses the GNSS clock ishigher than a priority of a synchronization source beyond networkcoverage that does not use the GNSS clock but lower than a priority of acell within network coverage.

A third aspect of the embodiments of the present invention provides aterminal, including:

an obtaining module, configured to obtain first configurationinformation, where the first configuration information includes a firstparameter;

a determining module, configured to determine, according to a globalnavigation satellite system GNSS clock, a transmission timeslotcorresponding to a current moment in a device-to-device D2Dcommunications system;

a judging module, configured to determine, according to the transmissiontimeslot determined by the determining module and the first parameterobtained by the obtaining module, whether the current moment is asynchronization information sending moment; and

a sending module, configured to: when the judging module determines thatthe current moment is the synchronization information sending moment,send sidelink synchronization information at the synchronizationinformation sending moment, where the sidelink synchronizationinformation carries indication information, the sidelink synchronizationinformation is used to synchronize a second terminal with the firstterminal, and the indication information is used to indicate, to thesecond terminal, that the first terminal is a synchronization sourcethat uses the GNSS clock.

With reference to the first aspect of the present invention, in a firstimplementation of the first aspect of the present invention,

the obtaining module is further configured to obtain secondconfiguration information; and

the determining module is further configured to determine, according tothe GNSS clock and the second configuration information that is obtainedby the obtaining module, the transmission timeslot corresponding to thecurrent moment in the D2D communications system.

With reference to the first implementation of the third aspect of thepresent invention, in a second implementation of the third aspect of thepresent invention,

the obtaining module is further configured to obtain the secondconfiguration information in a pre-configuration manner; or

the obtaining module is further configured to: when the first terminalis within network coverage, obtain the second configuration informationby receiving system broadcast information sent by a base station; or

the obtaining module is further configured to: when the first terminalis within network coverage, obtain the second configuration informationby receiving RRC signaling sent by a base station; or

the obtaining module is further configured to obtain the secondconfiguration information according to a preset protocol.

With reference to the first implementation or the second implementationof the third aspect of the present invention, in a third implementationof the third aspect of the present invention, the second configurationinformation includes a second parameter;

the determining module is further configured to determine the currentmoment according to the GNSS clock; and

the determining module is further configured to calculate thetransmission timeslot according to the current moment and the secondparameter in accordance with a preset calculation rule.

With reference to the third implementation of the third aspect of thepresent invention, in a fourth implementation of the third aspect of thepresent invention, the second parameter includes an initial referencemoment;

the determining module is further configured to calculate a differencebetween the current moment and the initial reference moment; and

the determining module is further configured to calculate, according tothe preset calculation rule and the difference, a frame number and asubframe number that correspond to the current moment in the D2Dcommunications system.

A fourth aspect of the embodiments of the present invention providesanother terminal, including:

an obtaining module, configured to obtain sidelink synchronizationinformation sent by a first terminal, where the sidelink synchronizationinformation carries indication information;

a determining module, configured to determine, according to theindication information obtained by the obtaining module, that the firstterminal is a synchronization source that uses a GNSS clock; and

a synchronization module, configured to synchronize the terminal withthe first terminal according to the sidelink synchronizationinformation.

With reference to the fourth aspect of the present invention, in a firstimplementation of the fourth aspect of the present invention, thesidelink synchronization information includes a sidelink synchronizationsignal SLSS, and the SLSS includes a primary synchronization signal PSSSand a secondary synchronization signal SSSS;

the determining module is further configured to parse the PSSS and/orthe SSSS to obtain a dedicated sequence, where the dedicated sequence isused to indicate that the first terminal is the synchronization sourcethat uses the GNSS clock; and

the determining module is further configured to determine, according tothe dedicated sequence, that the first terminal is the synchronizationsource that uses the GNSS clock.

With reference to the fourth aspect of the present invention, in thefirst implementation of the fourth aspect of the present invention, thesidelink includes a sidelink synchronization signal SLSS, and the SLSSincludes a primary synchronization signal PSSS and a secondarysynchronization signal SSSS;

the determining module is further configured to parse the PSSS to obtaina first dedicated sequence, where the first dedicated sequence is usedto indicate that the first terminal is the synchronization source thatuses the GNSS clock;

the determining module is further configured to determine, according tothe first dedicated sequence, that the first terminal is thesynchronization source that uses the GNSS clock;

the synchronization module is further configured to: when there aremultiple first terminals, parse the SSSS to obtain the second dedicatedsequence, where the second dedicated sequence includes target indicationinformation, and the target indication information is used to indicate apriority of the first terminal in synchronization sources that use theGNSS clock;

the synchronization module is further configured to determine asynchronization source priority of each first terminal according to thesecond dedicated sequence; and

the synchronization module is further configured to synchronize theterminal with a first terminal whose synchronization source priority isthe highest in the multiple first terminals.

With reference to the fourth aspect of the present invention, in a thirdimplementation of the fourth aspect of the present invention, thesidelink synchronization information includes a sidelink masterinformation block MIB-SL;

the determining module is further configured to parse the MIB-SL toobtain the indication information, where the indication information isused to indicate that the first terminal is the synchronization sourcethat uses the GNSS clock; and

the determining module is further configured to determine, according tothe indication information, that the first terminal is thesynchronization source that uses the GNSS clock.

With reference to the first implementation of the fourth aspect of thepresent invention, in a fourth implementation of the fourth aspect ofthe present invention, the sidelink synchronization information furtherincludes an MIB-SL, and the MIB-SL includes a transmission timeslot thatis determined by the first terminal according to the GNSS clock and thatcorresponds to a current moment in a D2D system;

the synchronization module is further configured to obtain a timeslotboundary of the first terminal according to the SLSS;

the synchronization module is further configured to align a timeslotboundary of the terminal with the timeslot boundary of the firstterminal;

the synchronization module is further configured to determine, accordingto the MIB-SL, the transmission timeslot that is determined by the firstterminal according to the GNSS clock and that corresponds to the currentmoment in the device-to-device D2D system; and

the synchronization module is further configured to align a transmissiontimeslot of the terminal with the transmission timeslot of the firstterminal.

A fifth aspect of the present invention provides a terminal, including:a radio frequency module, a processor, and a memory, where

the processor is configured to perform the following procedure:

determining, according to a GNSS clock, a transmission timeslotcorresponding to a current moment in a D2D system; and

determining, according to the transmission timeslot and the firstparameter, whether the current moment is a synchronization informationsending moment; and

the radio frequency module is configured to perform the followingprocedure:

obtaining first configuration information, where the first configurationinformation includes the first parameter; and

when the processor determines that the current moment is thesynchronization information sending moment, sending sidelinksynchronization information at the synchronization information sendingmoment, where the sidelink synchronization information carriesindication information, the sidelink synchronization information is usedto synchronize a second terminal with the first terminal, and theindication information is used to indicate, to the second terminal, thatthe first terminal is a synchronization source that uses the GNSS clock.

With reference to the fifth aspect of the present invention, in a firstimplementation of the fifth aspect of the present invention, the radiofrequency module is further configured to perform the followingprocedure:

obtaining second configuration information; and

determining, according to the GNSS clock and the second configurationinformation, the transmission timeslot corresponding to the currentmoment in the D2D communications system.

With reference to the first implementation of the fifth aspect of thepresent invention, in a second implementation of the fifth aspect of thepresent invention, the processor specifically performs the followingprocedure:

obtaining the second configuration information in a pre-configurationmanner; or

obtaining the second configuration information according to a presetprotocol; or

the radio frequency module specifically performs the followingprocedure:

when the first terminal is within network coverage, obtaining the secondconfiguration information by receiving system broadcast information sentby a base station; or

when the first terminal is within network coverage, obtaining the secondconfiguration information by receiving RRC signaling sent by a basestation.

With reference to the first or the second implementation of the fifthaspect of the present invention, in a third implementation of the fifthaspect of the present invention, the second configuration informationincludes a second parameter; and

the processor specifically performs the following procedure:

determining the current moment according to the GNSS clock; and

calculating the transmission timeslot according to the current momentand the second parameter in accordance with a preset calculation rule.

With reference to the third implementation of the fifth aspect of thepresent invention, in a fourth implementation of the embodiments of thepresent invention, the second parameter includes an initial referencemoment; and

the processor specifically performs the following procedure:

calculating a difference between the current moment and the initialreference moment; and

calculating, according to the preset calculation rule and thedifference, a frame number and a subframe number that correspond to thecurrent moment in the D2D communications system.

A sixth aspect of the embodiments of the present invention provides aterminal, including: a radio frequency module, a processor, and amemory, where

the radio frequency module performs the following procedure:

obtaining sidelink synchronization information sent by a first terminal,where the sidelink synchronization information carries indicationinformation; and

the processor performs the following procedure:

obtaining the sidelink synchronization information sent by the firstterminal, where the sidelink synchronization information carries theindication information; and

synchronizing the terminal with the first terminal according to thesidelink synchronization information.

With reference to the sixth aspect of the embodiments of the presentinvention, in a first implementation of the sixth aspect of the presentinvention, the sidelink synchronization information includes a sidelinksynchronization signal SLSS, and the SLSS includes a primarysynchronization signal PSSS and a secondary synchronization signal SSSS;and

the processor specifically performs the following procedure:

parsing the PSSS and/or the SSSS to obtain a dedicated sequence, wherethe dedicated sequence is used to indicate that the first terminal is asynchronization source that uses a GNSS clock; and

determining, according to the dedicated sequence, that the firstterminal is the synchronization source that uses the GNSS clock.

With reference to the sixth aspect of the present invention, in a secondimplementation of the sixth aspect of the present invention, thesidelink includes a sidelink synchronization signal SLSS, and the SLSSincludes a primary synchronization signal PSSS and a secondarysynchronization signal SSSS; and

the processor specifically performs the following procedure:

parsing the PSSS to obtain a first dedicated sequence, where the firstdedicated sequence is used to indicate that the first terminal is thesynchronization source that uses the GNSS clock;

determining, according to the first dedicated sequence, that the firstterminal is the synchronization source that uses the GNSS clock;

when there are multiple first terminals, parsing the SSSS to obtain thesecond dedicated sequence, where the second dedicated sequence includestarget indication information, and the target indication information isused to indicate a priority of the first terminal in synchronizationsources that use the GNSS clock;

determining a synchronization source priority of each first terminalaccording to the second dedicated sequence; and

synchronizing the terminal with a first terminal whose synchronizationsource priority is the highest in the multiple first terminals.

With reference to the sixth aspect of the present invention, in a thirdimplementation of the sixth aspect of the present invention, thesidelink synchronization information includes a sidelink masterinformation block MIB-SL; and

the processor specifically performs the following procedure:

parsing the MIB-SL to obtain the indication information, where theindication information is used to indicate that the first terminal isthe synchronization source that uses the GNSS clock; and

determining, according to the indication information, that the firstterminal is the synchronization source that uses the GNSS clock.

With reference to the first implementation of the sixth aspect of thepresent invention, in a fourth implementation of the sixth aspect of thepresent invention, the sidelink synchronization information furtherincludes an MIB-SL, and the MIB-SL includes a transmission timeslot thatis determined by the first terminal according to the GNSS clock and thatcorresponds to a current moment in a D2D system; and

the processor is further configured to perform the following procedure:

obtaining a timeslot boundary of the first terminal according to theSLSS;

aligning a timeslot boundary of the terminal with the timeslot boundaryof the first terminal;

determining, according to the MIB-SL, the transmission timeslot that isdetermined by the first terminal according to the GNSS clock and thatcorresponds to the current moment in the D2D system; and

aligning a transmission timeslot of the second terminal with thetransmission timeslot of the first terminal.

It can be learned from the foregoing technical solutions that, theembodiments of the present invention have the following advantages:

In the embodiments of the present invention, the first terminal candetermine, according to the global navigation satellite system (GNSS)clock, the transmission timeslot corresponding to the current moment inthe D2D communications system, and determine, according to thetransmission timeslot and the first parameter, whether the currentmoment is a synchronization information sending moment, and if thecurrent moment is the synchronization information sending moment, thefirst terminal sends the sidelink synchronization information at thesynchronization information sending moment. The sidelink synchronizationinformation carries the indication information, the sidelinksynchronization information is used to synchronize the second terminalwith the first terminal, and the indication information is used toindicate, to the second terminal, that the first terminal is thesynchronization source that uses the GNSS clock. Because the GNSS clockhas uniform timing and high precision, transmission timeslots determinedby different terminals by using the GNSS clock are consistent, andsending moments are also consistent. Therefore, the second terminal thataccesses this type of synchronization source can also be synchronized,thereby avoiding resource allocation misalignment and a communicationfailure that are caused by asynchronization, and improving transmissionperformance.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the presentinvention more clearly, the following briefly describes the accompanyingdrawings required for describing the embodiments. Apparently, theaccompanying drawings in the following description show merely someembodiments of the present invention, and a person skilled in the artmay still derive other drawings from these accompanying drawings withoutcreative efforts.

FIG. 1 is a schematic diagram of an embodiment of a synchronouscommunication method according to an embodiment of the presentinvention;

FIG. 2 is a schematic diagram of another embodiment of a synchronouscommunication method according to an embodiment of the presentinvention;

FIG. 3 is a schematic diagram of another embodiment of a synchronouscommunication method according to an embodiment of the presentinvention;

FIG. 4 is a schematic diagram of an embodiment of a terminal accordingto an embodiment of the present invention;

FIG. 5 is a schematic diagram of another embodiment of a terminalaccording to an embodiment of the present invention; and

FIG. 6 is a schematic diagram of another embodiment of a terminalaccording to an embodiment of the present invention.

DESCRIPTION OF EMBODIMENTS

The following clearly describes the technical solutions in theembodiments of the present invention with reference to the accompanyingdrawings in the embodiments of the present invention. Apparently, thedescribed embodiments are merely some but not all of the embodiments ofthe present invention. All other embodiments obtained by a personskilled in the art based on the embodiments of the present inventionwithout creative efforts shall fall within the protection scope of thepresent invention.

In the specification, claims, and accompanying drawings of the presentinvention, the terms “first”, “second”, “third”, “fourth”, and so on (ifexistent) are intended to distinguish between similar objects but do notnecessarily indicate a specific order or sequence. It should beunderstood that the data termed in such a way is interchangeable inproper circumstances so that the embodiments of the present inventiondescribed herein can be implemented in other orders than the orderillustrated or described herein. Moreover, the terms “include”,“contain” and any other variants mean to cover the non-exclusiveinclusion. For example, a process, method, system, product, or devicethat includes a series of steps or units is not necessarily limited tothose steps or units listed clearly, but may include other units notexpressly listed or inherent to such a process, method, system, product,or device.

It should be understood that, the technical solutions of the embodimentsof the present invention may be applied to various communicationssystems, such as: a Global System for Mobile Communications (GSM)system, a Code Division Multiple Access (CDMA) system, a Wideband CodeDivision Multiple Access (WCDMA) system, a general packet radio service(GPRS), a Long Term Evolution (LTE) system, an LTE frequency divisionduplex (FDD) system, an LTE time division duplex (TDD), a UniversalMobile Telecommunications System (UMTS), or a Worldwide Interoperabilityfor Microwave Access (WIMAX) communications system.

It should further be understood that in the embodiments of the presentinvention, a first terminal or a second terminal includes but is notlimited to user equipment (UE), a mobile station (MS), a mobileterminal, a mobile telephone, a handset, portable equipment, and thelike. The user equipment may communicate with one or more core networksby using a radio access network (RAN). For example, the user equipmentmay be a mobile telephone (or referred to as a “cellular” telephone), ora computer having a wireless communication function. The user equipmentmay further be a portable, pocket-sized, handheld, computer built-in, orin-vehicle mobile apparatus.

In the embodiments of the present invention, a base station may be abase transceiver station (BTS) in GSM or CDMA, or may be a NodeB inWCDMA, or may be an evolved NodeB (eNB) in LTE. This is not limited inthe embodiments of the present invention.

The embodiments of the present invention provide a synchronouscommunication method and a terminal, so as to avoid resource allocationmisalignment and a communication failure that are caused by asynchronization, and improve transmission performance.

First, synchronous communication in the embodiments of the presentinvention is described below from the perspective of a first terminal.Referring to FIG. 1, an embodiment of synchronous communication in theembodiments of the present invention includes the following steps.

101. The first terminal obtains first configuration information.

The first terminal obtains the first configuration information. Thefirst configuration information includes a first parameter, and thefirst parameter is used to determine whether a specific moment is asynchronization information sending moment. It should be noted that, thefirst terminal may obtain the first configuration information in apre-configuration manner, or may obtain the first configurationinformation according to a preset protocol, or when the first terminalis within network coverage, may receive system broadcast information orradio resource control (RRC) signaling sent by a base station, and thenobtain the first configuration information from the broadcastinformation or the RRC signaling. Alternatively, the first terminal mayobtain the first configuration information in another manner. This isnot specifically limited herein.

102. The first terminal determines, according to a GNSS clock, atransmission timeslot corresponding to a current moment in a D2Dcommunications system.

When the first terminal needs to perform D2D communication with anotherterminal as a synchronization source, the first terminal determines,according to the GNSS clock, the transmission timeslot corresponding tothe current moment in the D2D communications system.

It should be noted that, a GNSS is a generic term for all navigationsatellite systems, including global, regional, and augmented ones, forexample, the Global Positioning System (GPS) of America, the GLONASSnavigation satellite system of Russia, the Galileo satellite positioningsystem of Europe, the BeiDou Navigation Satellite System of China, andrelated augmented systems, such as the wide area augmentation system(WAAS) of America, the European Geostationary Navigation Overlay Systemof Europe, and the Multi-functional Satellite Augmentation System (MSAS)of Japan, and further including other navigation satellite systems thatare being built and to be built in the future.

103. The first terminal determines, according to the transmissiontimeslot and a first parameter, whether the current moment is asynchronization information sending moment; and if the current moment isthe synchronization information sending moment, step 104 is performed.

After determining the transmission timeslot corresponding to the currentmoment in the D2D communications system, the first terminal determines,according to the transmission timeslot and the first parameter, whetherthe current moment is the synchronization information sending moment. Ifthe current moment is the synchronization information sending moment,step 104 is performed.

104. The first terminal sends sidelink synchronization information atthe synchronization information sending moment.

When the first terminal determines that the current moment is thesynchronization information sending moment, the first terminal sends thesidelink synchronization information at the synchronization informationsending moment. The sidelink synchronization information carriesindication information, the sidelink synchronization information is usedto synchronize a second terminal with the first terminal, and theindication information is used to indicate, to the second terminal, thatthe first terminal is a synchronization source that uses the GNSS clock.

In this embodiment of the present invention, the first terminal candetermine, according to the GNSS clock, the transmission timeslotcorresponding to the current moment in the D2D communications system,and determine, according to the transmission timeslot and the firstparameter, whether the current moment is the synchronization informationsending moment; and if the current moment is the synchronizationinformation sending moment, the first terminal sends the sidelinksynchronization information at the synchronization information sendingmoment. The sidelink synchronization information carries the indicationinformation, the sidelink synchronization information is used tosynchronize the second terminal with the first terminal, and theindication information is used to indicate, to the second terminal, thatthe first terminal is the synchronization source that uses the GNSSclock. Because the GNSS clock has uniform timing and high precision,transmission timeslots determined by different terminals by using theGNSS clock are consistent, and sending moments are also consistent.Therefore, the second terminal that accesses this type ofsynchronization source can also be synchronized, thereby avoidingresource allocation misalignment and a communication failure that arecaused by asynchronization, and improving transmission performance.

For ease of understanding, the synchronous communication method on thefirst terminal side in the embodiments of the present invention isdescribed below in detail. Referring to FIG. 2, another embodiment ofthe synchronous communication method in the embodiments of the presentinvention includes the following steps.

201. A first terminal obtains first configuration information.

The first terminal obtains the first configuration information. Thefirst configuration information includes a first parameter, and thefirst parameter is used to determine whether a specific moment is asynchronization information sending moment. It should be noted that, thefirst terminal may obtain the first configuration information in apre-configuration manner, or may obtain the first configurationinformation according to a preset protocol, or when the first terminalis within network coverage, may receive system broadcast information orRRC signaling sent by a base station, and then obtain the firstconfiguration information from the broadcast information or the RRCsignaling. Alternatively, the first terminal may obtain the firstconfiguration information in another manner. This is not specificallylimited herein.

It should be further noted that, the first configuration information mayfurther include a determining rule for determining whether a moment is asynchronization information sending moment, and may further includeother information. This is not specifically limited herein.

202. The first terminal obtains second configuration information.

The first terminal obtains the second configuration information. Itshould be noted that, the first terminal may obtain the secondconfiguration information in a pre-configuration manner, or may obtainthe second configuration information according to a preset protocol, orwhen the first terminal is within network coverage, may receive systembroadcast information or RRC signaling sent by a base station, and thenobtain the second configuration information from the broadcastinformation or the RRC signaling. Alternatively, the first terminal mayobtain the second configuration information in another manner. This isnot specifically limited herein.

It should be further noted that, the second configuration informationmay further include a calculation rule for calculating a currenttimeslot or include a second parameter, and may further include otherinformation. This is not specifically limited herein.

203. The first terminal determines, according to a GNSS clock and thesecond configuration information, a transmission timeslot correspondingto a current moment in a D2D communications system.

After the first terminal obtains the second configuration information,when the first terminal needs to perform D2D communication with anotherterminal as a synchronization source, the first terminal determines,according to the GNSS clock and the second configuration information,the transmission timeslot corresponding to the current moment in the D2Dcommunications system.

It should be noted that, the transmission timeslot may be a framenumber, may be a subframe number, may be a frame number and a subframenumber, or may be other information. This is not specifically limitedherein.

If the second configuration information includes the second parameter,the first terminal determines, in the following manner, the transmissiontimeslot corresponding to the current moment in the D2D communicationssystem:

determining, by the first terminal, the current moment according to theGNSS clock, and then calculating the transmission timeslot according tothe current moment and the second parameter in accordance with a presetcalculation rule.

A manner in which the first terminal calculates the transmissiontimeslot varies according to the second parameter. In the followingdescription, for example, the second parameter includes an initialreference moment. When the second parameter includes the initialreference moment, the first terminal may calculate the transmissiontimeslot in accordance with the preset calculation rule in the followingmanner:

calculating, by the first terminal, a difference between the currentmoment and the initial reference moment, and calculating, according tothe difference, a frame number and a subframe number that correspond tothe current moment in the D2D communications system.

Specifically, according to the difference, the first terminal maycalculate the frame number DFN_(t) by using formula (1), and calculatethe subframe number suframe_(t) formula (2):

DFN_(t)=(a*T _(duration))mod K ₁  (1); and

suframe_(t)=(b*T _(duration))mod K ₂  (2); where

K₁ is a length of a frame period, T_(duration) is the difference, a is afirst scale parameter, the first scale parameter is used to align a timeunit of the difference with a frame length unit, K₂ is a length of asubframe period, b is a second scale parameter, and the second scaleparameter is used to align the time unit of the difference with asubframe length unit.

It should be noted that, the second configuration information may alsoinclude the calculation rule for calculating the transmission timeslot,and may further include other information. This is not specificallylimited herein. When the second configuration information includes thecalculation rule, the first terminal may calculate the transmissiontimeslot according to the current moment and the second parameter andaccording to the calculation rule included in the second configurationinformation. Alternatively, the first terminal may calculate thetransmission timeslot according to another manner. This is notspecifically limited herein.

204. The first terminal determines, according to the transmissiontimeslot and first parameter, whether the current moment is asynchronization information sending moment; and if the current moment isthe synchronization information sending moment, step 205 is performed;or if the current moment is not the synchronization information sendingmoment, step 206 is performed.

After determining the transmission timeslot corresponding to the currentmoment in the D2D communications system, the first terminal determines,according to the transmission timeslot and the first parameter, whetherthe current moment is the synchronization information sending moment. Ifthe current moment is the synchronization information sending moment,step 204 is performed. Specifically, the first terminal may determine,according to the first parameter and according to a determining rule,whether the transmission timeslot satisfies a preset condition, and whenthe transmission timeslot satisfies the preset condition, the firstterminal determines that the current moment is the synchronizationinformation sending moment. Further, when the first parameter includesan offset, and the transmission timeslot is a frame number and asubframe number, the first terminal determines whether the frame numberand the subframe number satisfy the following formula:

(c*DFN_(t)+subrame_(t))mod K ₃=syncOffsetIndicator  (3), where

suframe_(t) is the subframe number, DFN_(t) is the frame number, c is aquantity of subframes included in one frame, K₃ is a synchronizationsending period, and syncOffsetIndicato is the offset.

When the first terminal determines that the frame number and a subframenumber satisfy formula (3), the first terminal determines that thetransmission timeslot satisfies the preset condition, and determinesthat the current moment is the synchronization information sendingmoment.

It should be noted that, the first terminal may also determine,according to another manner, whether the current moment is thesynchronization information sending moment. This is not specificallylimited herein.

205. The first terminal sends sidelink synchronization information atthe synchronization information sending moment.

When the first terminal determines that the current moment is thesynchronization information sending moment, the first terminal sends thesidelink synchronization information at the synchronization informationsending moment. The sidelink synchronization information carriesindication information, the sidelink synchronization information is usedto synchronize a second terminal with the first terminal, and theindication information is used to indicate, to the second terminal, thatthe first terminal is a synchronization source that uses the GNSS clock.

It can be understood that, the sidelink synchronization informationincludes a sidelink synchronization signal (SLSS), the SLSS includes aprimary synchronization signal (PSSS) and a secondary synchronizationsignal (SSSS), and the indication information may be a dedicatedsequence. The dedicated sequence may be included in the PSSS, or thededicated sequence may be included in the SSSS; or one part of thededicated sequence is included in the PSSS, the other part of thesequence is included in the SSSS, and sequence parts in the PSSS and theSSSS jointly form the dedicated sequence.

In addition to carrying the indication information, the sidelinksynchronization information may further carry target indicationinformation. The target indication information is used to indicate, tothe second terminal, a priority of the first terminal in synchronizationsources that use the GNSS clock. The indication information may be afirst dedicated sequence that is included in the PSSS, and the targetindication information may be a second dedicated sequence that isincluded in the SSSS. In this way, after determining, according to theindication information, that the first terminal is the synchronizationsource that uses the GNSS clock, the second terminal can furtherdetermine, according to the second dedicated sequence, the priority ofthe first terminal in the synchronization sources that use the GNSSclock. It should be noted that, the target information may include atype of a GNSS technology used by the first terminal, or precision ofthe GNSS clock used by the first terminal, or a priority identifier, andmay further include other information. This is not specifically limitedherein.

Based on the foregoing four cases, the sidelink synchronizationinformation may further include a sidelink master information block(MIB-SL), and the MIB-SL includes information about the transmissiontimeslot, so that the second terminal can determine the transmissiontimeslot according to the information about the transmission timeslot,and perform timeslot alignment with the first terminal according to thetransmission timeslot.

Alternatively, the sidelink synchronization information includes anMIB-SL and an SLSS, and the MIB-SL includes the indication information.Optionally, the MIB-SL may further include information about thetransmission timeslot, so that the second terminal can determine thetransmission timeslot according to the information about thetransmission timeslot, and perform timeslot alignment with the firstterminal according to the transmission timeslot.

206. The first terminal performs another procedure.

When the first terminal determines that the current moment is not thesynchronization information sending moment, the first terminal performsthe another procedure. For example, the first terminal may return tostep 203 to step 205 at a next moment.

It should be noted that, in this embodiment of the present invention, apriority of a synchronization source is preset by a base station, and inthis embodiment of the present invention, a priority of asynchronization source that uses the GNSS clock may be higher than apriority of a synchronization source beyond network coverage that doesnot use the GNSS clock and a priority of a synchronization source withinnetwork coverage, or may be higher than only a priority of asynchronization source beyond network coverage that does not use theGNSS clock, or may be higher than a priority of a synchronization sourcebeyond network coverage that does not use the GNSS clock but lower thana priority of a synchronization source within network coverage. Thesynchronization source within the network coverage may be a basestation, or may be a terminal type synchronization source that does notuse the GNSS clock. This is not specifically limited herein.

It should be further noted that, in this embodiment of the presentinvention, a sequence of step 202 and step 201 is not limited. Step 202is performed before step 203, and may be performed before step 201 orafter step 201. This is not specifically limited herein.

In this embodiment of the present invention, the first terminal candetermine, according to the GNSS clock, the transmission timeslotcorresponding to the current moment in the D2D communications system,and determine, according to the transmission timeslot and the firstconfiguration information, whether the current moment is thesynchronization information sending moment, and if the current moment isthe synchronization information sending moment, the first terminal sendsthe sidelink synchronization information at the synchronizationinformation sending moment. The sidelink synchronization informationcarries the indication information, the sidelink synchronizationinformation is used to synchronize the second terminal with the firstterminal, and the indication information is used to indicate, to thesecond terminal, that the first terminal is the synchronization sourcethat uses the GNSS clock. Because the GNSS clock has uniform timing andhigh precision, transmission timeslots determined by different terminalsby using the GNSS clock are consistent, and sending moments are alsoconsistent. Therefore, the second terminal that accesses this type ofsynchronization source can also be synchronized, thereby avoidingresource allocation misalignment and a communication failure that arecaused by asynchronization, and improving transmission performance.

In addition, in this embodiment of the present invention, the indicationinformation may be carried in the sidelink synchronization informationin multiple manners, and the terminal may determine, according to theGNSS clock in multiple manners, the transmission timeslot correspondingto the current moment in the D2D communications system, therebyimproving flexibility of the solution.

The foregoing describes the synchronous communication method in theembodiments of the present invention from the perspective of a firstterminal, and the following describes the synchronous communicationmethod in the embodiments of the present invention from the perspectiveof a second terminal. Referring to FIG. 3, another embodiment of thesynchronous communication method in the embodiments of the presentinvention includes the following steps.

301. The second terminal obtains sidelink synchronization informationsent by a first terminal.

The first terminal determines, according to a GNSS clock, a transmissiontimeslot corresponding to a current moment in a D2D communicationssystem, determines, according to the transmission timeslot and firstconfiguration information, that the current moment is a synchronizationinformation sending moment, and sends the sidelink synchronizationinformation at the synchronization information sending moment. Thesidelink synchronization information carries indication information. Inthis case, the second terminal is around the first terminal, and needsto synchronize with a synchronization source. The second terminal findsthe sidelink synchronization information sent by the first terminal, andobtains the sidelink synchronization information sent by the firstterminal. The sidelink synchronization information carries theindication information.

302. The second terminal determines, according to indicationinformation, that the first terminal is a synchronization source thatuses a GNSS clock, and synchronizes with the first terminal according tothe sidelink synchronization information.

After obtaining the sidelink synchronization information sent by thefirst terminal, the second terminal determines, according to theindication information carried in the sidelink synchronizationinformation, that the first terminal is the synchronization source thatuses the GNSS clock, and synchronizes with the first terminal accordingto the sidelink synchronization information.

In this embodiment of the present invention, the first terminal candetermine, according to the global navigation satellite system GNSSclock, the transmission timeslot corresponding to the current moment inthe D2D communications system, determine, according to the transmissiontimeslot and the first configuration information, that the currentmoment is the synchronization information sending moment, and send thesidelink synchronization information at the synchronization informationsending moment. The sidelink synchronization information carries theindication information. The second terminal determines, according to theindication information, that the first terminal is the synchronizationsource that uses the GNSS clock, and synchronizes with the firstterminal according to the sidelink synchronization information. Becausethe GNSS clock has uniform timing and high precision, transmissiontimeslots determined by different terminals by using the GNSS clock areconsistent, and sending moments are also consistent. Therefore, thesecond terminal that accesses this type of synchronization source canalso be synchronized, thereby avoiding resource allocation misalignmentand a communication failure that are caused by asynchronization, andimproving transmission performance.

Further referring to FIG. 3, in this embodiment of the presentinvention, the sidelink synchronization information includes an SLSS,and the SLSS includes a PSSS and an SSSS. The second terminal maydetermine, in the following manners, that the first terminal is thesynchronization source that uses the GNSS clock:

1. The second terminal parses the PSSS to obtain a dedicated sequence.The dedicated sequence is used to indicate that the first terminal isthe synchronization source that uses the GNSS clock. The second terminaldetermines, according to the dedicated sequence, that the first terminalis the synchronization source that uses the GNSS clock.

2. The second terminal parses the SSSS to obtain a dedicated sequence.The dedicated sequence is used to indicate that the first terminal isthe synchronization source that uses the GNSS clock. The second terminaldetermines, according to the dedicated sequence, that the first terminalis the synchronization source that uses the GNSS clock.

3. The second terminal parses the PSSS to obtain a first sequence part,and parses the SSSS to obtain a second sequence part. The secondterminal combines the first sequence part and the second sequence partto obtain a dedicated sequence. The dedicated sequence is used toindicate that the first terminal is the synchronization source that usesthe GNSS clock. The second terminal determines, according to thededicated sequence, that the first terminal is the synchronizationsource that uses the GNSS clock.

It can be understood that, the sidelink synchronization information mayfurther include an MIB-SL, the MIB-SL includes information about thetransmission timeslot, and the information about the transmissiontimeslot is used to indicate the transmission timeslot that isdetermined by the first terminal according to a GNSS and thatcorresponds to the current moment in the D2D system. The transmissiontimeslot may be a subframe number, may be a frame number, or may be aframe number and a subframe number.

The second terminal may synchronize with the first terminal in thefollowing manner according to the sidelink synchronization informationsent by the first terminal:

obtaining, by the second terminal, a timeslot boundary of the firstterminal according to the SLSS; aligning, by the second terminal, atimeslot boundary of the second terminal with the timeslot boundary ofthe first terminal; determining, by the second terminal according to theMIB-SL, the transmission timeslot corresponding to the current moment inthe D2D system; and aligning, by the second terminal, a transmissiontimeslot of the second terminal with the transmission timeslot of thefirst terminal.

It should be noted that, in this embodiment of the present invention, apriority of a synchronization source that uses the GNSS clock may behigher than a priority of a synchronization source beyond networkcoverage that does not use the GNSS clock and a priority of asynchronization source within network coverage, or may be higher thanonly a priority of a synchronization source beyond network coverage thatdoes not use the GNSS clock, or may be higher than a priority of asynchronization source beyond network coverage that does not use theGNSS clock but lower than a priority of a synchronization source withinnetwork coverage. The synchronization source within the network coveragemay be a base station, or may be a terminal type synchronization sourcethat does not use the GNSS clock. This is not specifically limitedherein. When the second terminal finds multiple synchronization sources,on the premise that the multiple synchronization sources satisfy asignal quality requirement, the second terminal preferentially accessesa synchronization source whose priority is higher.

In this embodiment of the present invention, the second terminal maydetermine, in multiple manners, that the first terminal is thesynchronization source that uses the GNSS clock.

In addition, this embodiment of the present invention provides aspecific manner in which the second terminal synchronizes with the firstterminal according to the sidelink synchronization information sent bythe first terminal, thereby improving implementability of the solution.

Further referring to FIG. 3, in this embodiment of the presentinvention, the sidelink synchronization information includes an SLSS,and the SLSS includes a PSSS and an SSSS. The second terminal maydetermine, in the following manner, that the first terminal is thesynchronization source that uses the GNSS clock:

parsing, by the second terminal, the PSSS to obtain a first dedicatedsequence, where the first dedicated sequence is used to indicate thatthe first terminal is the synchronization source that uses the GNSSclock; and determining, by the second terminal according to the firstdedicated sequence, that the first terminal is the synchronizationsource that uses the GNSS clock.

In this case, the second terminal may synchronize with the firstterminal according to the sidelink synchronization information in thefollowing manner:

when there are multiple first terminals, parsing, by the secondterminal, the SSSS to obtain a second dedicated sequence, where thesecond dedicated sequence includes target indication information, andthe target indication information is used to indicate a priority of thefirst terminal in synchronization sources that use the GNSS clock;

determining, by the second terminal, a synchronization source priorityof each first terminal according to the second dedicated sequence of theterminal; and

synchronizing, by the second terminal, with a first terminal whosesynchronization source priority is the highest in the multiple firstterminals.

It should be noted that, the target indication information may include atype of a GNSS technology used by the first terminal, or synchronizationprecision of the GNSS clock used by the first terminal, or a priorityidentifier of the first terminal.

Specifically, the second terminal determines the synchronization sourcepriority of the first terminal according to a GNSS type and a presetpriority rule. For example, the preset priority rule is that the BeiDouNavigation Satellite System of China has a priority over the GPS ofAmerica. When the second terminal finds two first terminals, a seconddedicated sequence of one first terminal indicates that a type of a GNSStechnology used by the first terminal is BeiDou of China, and a seconddedicated sequence of the other first terminal indicates that a type ofa GNSS technology used by the first terminal is the GPS of America, thesecond terminal chooses to synchronize with the first terminal whoseGNSS type is BeiDou of China.

Alternatively, the second terminal determines the synchronization sourcepriority of the first terminal according to a GNSS type and a presetpriority rule. For example, the preset priority rule is that asynchronization source with higher synchronization precision has ahigher priority. When the second terminal finds two first terminals, asecond dedicated sequence of one first terminal indicates that the firstterminal has synchronization precision of 0.2, and a second dedicatedsequence of the other first terminal indicates that the first terminalhas synchronization precision of 0.1, the second terminal chooses tosynchronize with the first terminal that has the synchronizationprecision of 0.1.

Alternatively, the second terminal determines the synchronization sourcepriority of the first terminal according to a GNSS type and a presetpriority rule. For example, the preset priority rule is that the BeiDouNavigation Satellite System of China has a priority over the GPS ofAmerica, and a synchronization source with higher synchronizationprecision has a higher priority when a same GNSS technology is used.When the second terminal finds three first terminals, a second dedicatedsequence of a first terminal 1 indicates that a type of a GNSStechnology used by the first terminal is the GPS of America, and thatsynchronization precision is 0.1; a second dedicated sequence of a firstterminal 2 indicates that a type of a GNSS technology used by the firstterminal is BeiDou of China, and that synchronization precision is 0.2;and a second dedicated sequence of a first terminal 3 indicates that atype of a GNSS technology used by the first terminal is BeiDou of China,and that synchronization precision is 0.1, the second terminal choosesto synchronize with the first terminal 3.

Alternatively, the second terminal determines the synchronization sourcepriority of the first terminal according to the priority identifier.When the second terminal finds two first terminals, a second dedicatedsequence of one first terminal indicates that the first terminal has apriority of 1, and a second dedicated sequence of the other firstterminal indicates that the first terminal has a priority of 2, thesecond terminal chooses to synchronize with the first terminal that hasthe priority of 2.

It should be noted that, in this embodiment of the present invention, apriority of a synchronization source that uses the GNSS clock may behigher than a priority of a synchronization source beyond networkcoverage that does not use the GNSS clock and a priority of asynchronization source within network coverage, or may be higher thanonly a priority of a synchronization source beyond network coverage thatdoes not use the GNSS clock, or may be higher than a priority of asynchronization source beyond network coverage that does not use theGNSS clock but lower than a priority of a synchronization source withinnetwork coverage. The synchronization source within the network coveragemay be a base station, or may be a terminal type synchronization sourcethat does not use the GNSS clock. This is not specifically limitedherein. When the second terminal finds multiple synchronization sources,on the premise that the multiple synchronization sources satisfy asignal quality requirement, the second terminal preferentially accessesa synchronization source whose priority is higher.

In this embodiment of the present invention, when there are multiplefirst terminals, the second terminal may determine a priority of eachfirst terminal according to the second dedicated sequence of the firstterminal, and choose to synchronize with a first terminal whose priorityis the highest, thereby improving flexibility of the solution.

Further referring to FIG. 3, in this embodiment of the presentinvention, the sidelink synchronization information includes an MIB-SL.The second terminal may determine, in the following manner, that thefirst terminal is the synchronization source that uses the GNSS clock:

parsing, by the second terminal, the MIB-SL to obtain the indicationinformation, where the indication information is used to indicate thatthe first terminal is the synchronization source that uses the GNSSclock; and determining, by the second terminal according to theindication information, that the first terminal is the synchronizationsource that uses the GNSS clock.

Optionally, the MIB-SL may further include information about thetransmission timeslot, and the information about the transmissiontimeslot is used to indicate the transmission timeslot that isdetermined by the first terminal according to a GNSS and thatcorresponds to the current moment in the D2D system. The transmissiontimeslot may be a subframe number, may be a frame number, or may be aframe number and a subframe number. The second terminal may implementtimeslot alignment with the first terminal according to the transmissiontimeslot.

It should be noted that, in this embodiment of the present invention, apriority of a synchronization source that uses the GNSS clock may behigher than a priority of a synchronization source beyond networkcoverage that does not use the GNSS clock and a priority of asynchronization source within network coverage, or may be higher thanonly a priority of a synchronization source beyond network coverage thatdoes not use the GNSS clock, or may be higher than a priority of asynchronization source beyond network coverage that does not use theGNSS clock but lower than a priority of a synchronization source withinnetwork coverage. The synchronization source within the network coveragemay be a base station, or may be a terminal type synchronization sourcethat does not use the GNSS clock. This is not specifically limitedherein. When the second terminal finds multiple synchronization sources,on the premise that the multiple synchronization sources satisfy asignal quality requirement, the second terminal preferentially accessesa synchronization source whose priority is higher.

In this embodiment of the present invention, the second terminal canobtain the indication information by using the MIB-SL, thereby improvingflexibility of the solution.

For ease of understanding, the following describes in detail thesynchronous communication method in this embodiment of the presentinvention by using an actual application scenario:

A vehicle A is a vehicle that uses the BeiDou positioning system ofChina and that can perform vehicle-to-vehicle communication. When thevehicle A is beyond a network coverage area, the vehicle A obtains firstconfiguration information and second configuration information that arepre-configured. The second configuration information includes an initialreference moment (a second parameter) T_(ref): 2015-01-01 00:00:00. Thefirst configuration information includes an offset (a first parameter)and a determining rule for determining whether a current moment is asynchronization information sending moment. The offset issyncOffsetIndicato=0 and the determining rule is determining whether asubframe number

DFN_(t) and a subframe number suframe_(t) that correspond to a currenttimeslot satisfy the following formula:

(c*DFN_(t)+subrame_(t))mod K ₃=syncOffsetIndicator, where

suframe_(t) is the subframe number, is the frame number, c is a quantityof subframes included in one frame, K₃ is a synchronization sendingperiod, and syncOffsetIndicato is the offset.

When the vehicle A needs to perform D2D communication, the vehicle Afirst searches for a synchronization source around, and finally finds nosynchronization source. Then the vehicle A needs to serve as asynchronization source and send synchronization information. First, thevehicle A determines, according to a GNSS clock, that the current momentis 2015-01-01 00:02:00. The vehicle A calculates a differenceT_(duration) between the current moment and the initial referencemoment, and determines, according to T_(duration)=T−T_(ref), thatT_(duration) is 120 seconds. In addition, it is known that a framelength is 10 milliseconds, each frame includes 10 subframes (that is, asubframe length is 1 millisecond), 1024 frames form one period, and asynchronization signal is sent once every 10 subframes. That is, a frameperiod length is K₁=1024, a subframe period length is K₂=10, asynchronization sending period is K₃=10, a first scale parameter used toalign a time unit of the difference with a frame length unit is a=100 aquantity of subframes included in one frame is c=10, and a second scaleparameter used to align the time unit of the difference with a subframelength unit is b=1000.

Then the vehicle A calculates the frame number DFN_(t) and the subframenumber suframe_(t) according to the following preset formulas:

DFN_(t)=(a*T _(duration))mod K ₁=(100*120)mod 1024=736; and

suframe_(t)=(b*T _(duration))mod K ₂=(1000*120)mod 10=10.

After obtaining the frame number and the subframe number by means ofcalculation, the vehicle A determines, according to the determining rulein the second configuration information, whether the current moment isthe synchronization information sending moment:

(c*DFN_(t)+subrame_(t))mod K ₃=(10*736+10)mod 10=0=syncOffsetIndicator.

Therefore, the vehicle A determines that the current moment is thesynchronization information sending moment, and the vehicle A sendssidelink synchronization information at the synchronization informationsending moment, that is, 2015-01-01 00:02:00. The sidelinksynchronization information includes an SLSS and an MIB-SL. The SLSSincludes a PSSS and an SSSS, the PSSS carries a dedicated sequence, andthe dedicated sequence is used to indicate, to another device, that thevehicle A is a synchronization source that uses the GNSS clock. TheMIB-SL carries information about a transmission timeslot, and theinformation about the transmission timeslot is DFN_(t)=736 andsuframe_(t)=10

In this case, a vehicle B is near the vehicle A, and the vehicle B alsoneeds to perform D2D communication. The vehicle B first searches for asynchronization source around, and finds multiple synchronizationsources, of which two synchronization sources: the vehicle A and avehicle C satisfy a signal quality requirement. The vehicle B detectssidelink synchronization information, that is, SLSSs and MIB-SLs, sentby the vehicle A and the vehicle C. The vehicle B parses the PSSS of theSLSS of the vehicle A to obtain the dedicated sequence. The dedicatedsequence is used to indicate, to another device, that the vehicle A is asynchronization source that uses the GNSS clock. The vehicle B parses aPSSS in the SLSS and the MIB-SL of the vehicle C and learns that thevehicle C is a synchronization source beyond network coverage. Inaddition, the vehicle B obtains no information indicating that thevehicle C is a synchronization source that uses the GNSS clock. Thevehicle B determines that the vehicle C is a synchronization sourcebeyond network coverage that does not use the GNSS clock. According to apreset priority rule, a priority of a synchronization source that usesthe GNSS clock is higher than a priority of a synchronization sourcebeyond network coverage that does not use the GNSS clock. Therefore, thevehicle B chooses to synchronize with the vehicle A. Specifically, thevehicle B obtains a timeslot boundary of the vehicle A according to theSLSS, aligns a timeslot boundary of the vehicle B with the timeslotboundary of the vehicle A, determines, according to the MIB-SL, that thevehicle A has a frame number of 736 and a subframe number of 10, andaligns a frame number and a subframe number of the vehicle B with theframe number and the subframe number. In this way, the vehicle Bcompletes synchronization with the vehicle A.

The foregoing describes the synchronous communication method in theembodiments of the present invention, and the following describes theterminal in the embodiments of the present invention. Referring to FIG.4, an embodiment of the terminal in the embodiments of the presentinvention includes:

an obtaining module 401, configured to obtain first configurationinformation, where the first configuration information includes a firstparameter;

a determining module 402, configured to determine, according to a GNSSclock, a transmission timeslot corresponding to a current moment in aD2D communications system;

a judging module 403, configured to determine, according to thetransmission timeslot and the first parameter, whether the currentmoment is a synchronization information sending moment; and

a sending module 404, configured to: when the judging module 403determines that the current moment is the synchronization informationsending moment, send sidelink synchronization information at thesynchronization information sending moment, where the sidelinksynchronization information carries indication information, the sidelinksynchronization information is used to synchronize a second terminalwith the first terminal, and the indication information is used toindicate, to the second terminal, that the first terminal is asynchronization source that uses the GNSS clock.

In this embodiment of the present invention, the determining module 402can determine, according to the GNSS clock, the transmission timeslotcorresponding to the current moment in the D2D communications system,the judging module 403 determines, according to the transmissiontimeslot and the first parameter, whether the current moment is thesynchronization information sending moment, and if the current moment isthe synchronization information sending moment, the sending module 404sends the sidelink synchronization information at the synchronizationinformation sending moment. The sidelink synchronization informationcarries the indication information, the sidelink synchronizationinformation is used to synchronize the second terminal with the firstterminal, and the indication information is used to indicate, to thesecond terminal, that the first terminal is the synchronization sourcethat uses the GNSS clock. Because the GNSS clock has uniform timing andhigh precision, transmission timeslots determined by different terminalsby using the GNSS clock are consistent, and sending moments are alsoconsistent. Therefore, the second terminal that accesses this type ofsynchronization source can also be synchronized, thereby avoidingresource allocation misalignment and a communication failure that arecaused by asynchronization, and improving transmission performance.

Based on the embodiment corresponding to FIG. 4, in another embodimentof the embodiments of the present invention,

the obtaining module 401 is further configured to obtain secondconfiguration information; and

the determining module 402 is further configured to determine, accordingto the GNSS clock and the second configuration information that isobtained by the obtaining module 401, the transmission timeslotcorresponding to the current moment in the D2D communications system.

Optionally, in this embodiment of the present invention, the secondconfiguration information may include a second parameter.

The determining module 402 may be further configured to determine thecurrent moment according to the GNSS clock, and calculate thetransmission timeslot according to the current moment and the secondparameter in accordance with a preset rule.

Optionally, in this embodiment of the present invention, the secondparameter may include an initial reference moment.

The determining module 402 may be further configured to calculate adifference between the current moment and the initial reference moment,and calculate, according to the preset calculation rule and thedifference, a frame number and a subframe number that correspond to thecurrent moment in the D2D communications system.

In this embodiment of the present invention, a specific manner in whichthe determining module 402 determines the transmission timeslot improvesimplementability of the solution.

Optionally, in some other embodiments in the embodiments of the presentinvention,

the obtaining module 401 may obtain the second configuration informationin a pre-configuration manner; or

when the first terminal is within network coverage, obtain the secondconfiguration information by receiving system broadcast information sentby a base station; or when the first terminal is within networkcoverage, obtain the second configuration information by receiving RRCsignaling sent by a base station; or

obtain the second configuration information according to a presetprotocol.

In this embodiment of the present invention, the obtaining module 401can obtain the second configuration information in multiple manners,thereby improving flexibility of the solution.

The foregoing describes the first terminal in the embodiments of thepresent invention, and the following describes a second terminal in theembodiments of the present invention. Referring to FIG. 5, anotherterminal in the embodiments of the present invention includes:

an obtaining module 501, configured to obtain sidelink synchronizationinformation sent by a first terminal, where the sidelink synchronizationinformation carries indication information;

a determining module 502, configured to determine, according to theindication information, that the first terminal is a synchronizationsource that uses a GNSS clock; and

a synchronization module 503, configured to synchronize the terminalwith the first terminal according to the sidelink synchronizationinformation.

In this embodiment of the present invention, the first terminal candetermine, according to the global navigation satellite system GNSSclock, the transmission timeslot corresponding to the current moment inthe D2D communications system, determine, according to the transmissiontimeslot and the first configuration information, that the currentmoment is a synchronization information sending moment, and send thesidelink synchronization information at the synchronization informationsending moment. The sidelink synchronization information carries theindication information. The determining module 602 of the secondterminal determines, according to the indication information, that thefirst terminal is the synchronization source that uses the GNSS clock,and the synchronization module 603 synchronizes the second terminal withthe first terminal according to the sidelink synchronizationinformation. Because the GNSS clock has uniform timing and highprecision, transmission timeslots determined by different terminals byusing the GNSS clock are consistent, and sending moments are alsoconsistent. Therefore, the second terminal that accesses this type ofsynchronization source can also be synchronized, thereby avoidingresource allocation misalignment and a communication failure that arecaused by asynchronization, and improving transmission performance.

Based on the embodiment corresponding to FIG. 5, in this embodiment ofthe present invention, the sidelink synchronization information includesa sidelink synchronization signal SLSS, and the SLSS includes a primarysynchronization signal PSSS and a secondary synchronization signal SSSS.

The determining module 502 is further configured to parse the PSSSand/or the SSSS to obtain a dedicated sequence, where the dedicatedsequence is used to indicate that the first terminal is thesynchronization source that uses the GNSS clock.

The determining module 502 is further configured to determine, accordingto the dedicated sequence, that the first terminal is thesynchronization source that uses the GNSS clock.

Optionally, in this embodiment of the present invention, the sidelinksynchronization information further includes an MIB-SL, and the MIB-SLincludes a transmission timeslot that is determined by the firstterminal according to the GNSS clock and that corresponds to a currentmoment in a D2D system.

The synchronization module 503 is further configured to obtain atimeslot boundary of the first terminal according to the SLSS, and aligna timeslot boundary of the terminal with the timeslot boundary of thefirst terminal.

The synchronization module 503 is further configured to determine,according to the MIB-SL, the transmission timeslot that is determined bythe first terminal according to the GNSS clock and that corresponds tothe current moment in the D2D system, and align a transmission timeslotof the terminal with the transmission timeslot of the first terminal.

This embodiment of the present invention provides a specific manner inwhich the determining module 502 determines that the first terminal isthe synchronization source that uses the GNSS clock and a specificmanner in which the synchronization module 503 synchronizes the terminalwith the first terminal according to the sidelink synchronizationinformation, thereby improving implementability of the solution.

Based on the embodiment corresponding to FIG. 5, in this embodiment ofthe present invention, the sidelink includes a sidelink synchronizationsignal SLSS, and the SLSS includes a primary synchronization signal PSSSand a secondary synchronization signal SSSS.

The determining module 502 is further configured to parse the PSSS toobtain a first dedicated sequence, where the first dedicated sequence isused to indicate that the first terminal is the synchronization sourcethat uses the GNSS clock.

The determining module 502 is further configured to determine, accordingto the first dedicated sequence, that the first terminal is thesynchronization source that uses the GNSS clock.

The synchronization module 503 is further configured to: when there aremultiple first terminals, parse the SSSS to obtain a second dedicatedsequence, where the second dedicated sequence includes target indicationinformation, and the target indication information is used to indicate apriority of the first terminal in synchronization sources that use theGNSS clock.

The synchronization module 503 is further configured to determine asynchronization source priority of each first terminal according to thesecond dedicated sequence.

The synchronization module 503 is further configured to synchronize theterminal with a first terminal whose synchronization source priority isthe highest in the multiple first terminals.

In this embodiment of the present invention, when there are multiplefirst terminals, the synchronization module 503 can choose tosynchronize with the first terminal whose priority is the highest,thereby improving flexibility of the solution.

Based on the embodiment corresponding to FIG. 5, in this embodiment ofthe present invention, the sidelink synchronization information includesan MIB-SL.

The determining module 502 is further configured to parse the MIB-SL toobtain the indication information, where the indication information isused to indicate that the first terminal is the synchronization sourcethat uses the GNSS clock.

The determining module 502 is further configured to determine, accordingto the indication information, that the first terminal is thesynchronization source that uses the GNSS clock.

This embodiment of the present invention provides another specificmanner in which the determining module 502 determines that the firstterminal is the synchronization source that uses the GNSS clock, therebyimproving flexibility of the solution.

The foregoing describes the first terminal and the second terminal inthe embodiments of the present invention from the perspective of modulefunctionalization, and the following describes a first terminal and asecond terminal in the embodiments of the present invention from theperspective of a hardware entity. The first terminal and the secondterminal may include any terminal device such as a mobile phone, atablet computer, and an in-vehicle computer. The following descriptionis provided by using a mobile phone as an example. Referring to FIG. 6,another embodiment of a terminal in this embodiment of the presentinvention includes:

components such as a radio frequency (RF) circuit 610, a memory 620, aninput unit 630, a display unit 640, a sensor 650, an audio circuit 660,a wireless fidelity (WiFi) module 670, a processor 680, and a powersupply 690. A person skilled in the art may understand that thestructure of the mobile phone shown in FIG. 10 does not constitute alimitation to the mobile phone, and the mobile phone may include more orfewer components than those shown in the figure, or some components maybe combined, or a different component deployment may be used.

The following specifically describes the components of the mobile phonewith reference to FIG. 6.

The RF circuit 610 may be configured to send or receive a signal in aninformation receiving and sending process or a call process.Particularly, the RF circuit 610 receives downlink information from abase station, then delivers the downlink information to the processor680 for processing, and sends uplink data to the base station.Generally, the RF circuit 610 includes, but is not limited to, anantenna, at least one amplifier, a transceiver, a coupler, a low noiseamplifier (LNA), a duplexer, and the like. In addition, the RF circuit610 may further communicate with a network and another device by meansof wireless communication. The wireless communication may use anycommunication standard or protocol, including but not limited to: aGlobal system for Mobile Communications (GSM), a general packet radioservice (GPRS), Code Division Multiple Access (CDMA), Wideband CodeDivision Multiple Access (WCDMA), Long Term Evolution (LTE), an email, ashort messaging service (SMS), and the like.

The memory 620 may be configured to store a software program and module.The processor 680 runs the software program and module stored in thememory 620, to implement various functional applications and dataprocessing of the mobile phone. The memory 620 may mainly include aprogram storage area and a data storage area. The program storage areamay store an operating system, an application program required by atleast one function (such as a sound playback function and an imagedisplay function), and the like. The data storage area may store data(such as audio data and an address book) created according to use of themobile phone. In addition, the memory 620 may include a high-speedrandom access memory, and may also include a non-volatile memory, suchas at least one magnetic disk storage device, a flash memory, or anothervolatile solid-state storage device.

The input unit 630 may be configured to receive input digit or characterinformation, and generate a key signal input related to the user settingand function control of the mobile phone. Specifically, the input unit630 may include a touch panel 631 and another input device 632. Thetouch panel 631, also referred to as a touchscreen, may collect a touchoperation of a user on or near the touch panel (such as an operation ofa user on or near the touch panel 631 by using any suitable object oraccessory such as a finger or a stylus), and drive a correspondingconnection apparatus according to a preset program. Optionally, thetouch panel 631 may include two parts: a touch detection apparatus and atouch controller. The touch detection device detects a touch position ofthe user, detects a signal generated by the touch operation, andtransfers the signal to the touch controller. The touch controllerreceives the touch information from the touch detection apparatus,converts the touch information into touch point coordinates, and sendsthe touch point coordinates to the processor 680. Moreover, the touchcontroller can receive and execute a command sent from the processor680. In addition, the touch panel 631 may be a resistive, capacitive,infrared, or surface sound wave type touch panel. In addition to thetouch panel 631, the input unit 630 may further include the anotherinput device 632. Specifically, the another input device 632 mayinclude, but is not limited to, one or more of a physical keyboard, afunctional key (such as a volume control key or a switch key), atrackball, a mouse, a joystick, or the like.

The display unit 640 may be configured to display information input bythe user or information provided for the user, and various menus of themobile phone. The display unit 640 may include a display panel 641.Optionally, the display panel 641 may be configured by using a liquidcrystal display (LCD), an organic light-emitting diode (OLED), or thelike. Further, the touch panel 631 may cover the display panel 641.After detecting a touch operation on or near the touch panel 631, thetouch panel 631 transfers the touch operation to the processor 680, soas to determine a type of a touch event. The processor 680 then providesa corresponding visual output on the display panel 641 according to thetype of the touch event. Although, in FIG. 6, the touch panel 631 andthe display panel 641 implement input and output functions of the mobilephone as two separate parts, in some embodiments, the touch panel 631and the display panel 641 may be integrated to implement the input andoutput functions of the mobile phone.

The mobile phone may further include at least one sensor 650 such as anoptical sensor, a motion sensor, and another sensor. Specifically, theoptical sensor may include an ambient light sensor and a proximitysensor. The ambient light sensor may adjust luminance of the displaypanel 641 according to brightness of the ambient light. The proximitysensor may switch off the display panel 641 and/or backlight when themobile phone is moved to an ear. As a type of motion sensor, anacceleration sensor may detect magnitudes of accelerations in variousdirections (generally on three axes), may detect a magnitude and adirection of the gravity when static, and may be applied to anapplication that recognizes the attitude of the mobile phone (forexample, switching between landscape orientation and portraitorientation, a related game, and magnetometer attitude calibration), afunction related to vibration recognition (such as a pedometer and aknock), and the like. Other sensors such as a gyroscope, a barometer, ahygrometer, a thermometer, and an infrared sensor, which may beconfigured in the mobile phone, are not further described herein.

The audio circuit 660, a speaker 661, and a microphone 662 may provideaudio interfaces between the user and the mobile phone. The audiocircuit 660 may convert received audio data into an electric signal andtransmit the electric signal to the speaker 661. The speaker 661converts the electric signal into a sound signal for output. On theother hand, the microphone 662 converts a collected sound signal into anelectric signal. The audio circuit 660 receives the electric signal andconverts the electric signal into audio data, and outputs the audio datato the processor 680 for processing. Then, the processor 680 sends theaudio data to, for example, another mobile phone by using the RF circuit610, or outputs the audio data to the memory 620 for further processing.

WiFi belongs to a short-range wireless transmission technology. With theWiFi module 670, the mobile phone can help the user to send or receivean email, browse a web page, access streaming media, and the like. TheWiFi module provides wireless broadband Internet access for the user.Although FIG. 6 shows the WiFi module 670, it may be understood that theWiFi module is not a necessary component of the mobile phone, and whenrequired, the WiFi module may be omitted provided that the scope of theessence of the present invention is not changed.

The processor 680 is a control center of the mobile phone, and isconnected to various parts of the mobile phone by using variousinterfaces and lines. By running or executing the software programand/or module stored in the memory 620, and invoking data stored in thememory 620, the processor 780 performs various functions and dataprocessing of the mobile phone, thereby performing overall monitoring onthe mobile phone. Optionally, the processor 680 may include one or moreprocessing units. Preferably, the processor 680 may be integrated withan application processor and a modem processor. The applicationprocessor mainly processes an operating system, a user interface, anapplication program, and the like. The modem processor mainly processeswireless communication. It may be understood that the foregoing modemprocessor may not be integrated into the processor 680.

The mobile phone further includes the power supply 690 (such as abattery) for supplying power to the components. Preferably, the powersupply may be logically connected to the processor 680 by using a powermanagement system, thereby implementing functions such as charging,discharging, and power consumption management by using the powermanagement system.

Although not shown in the figure, the mobile phone may further include acamera, a Bluetooth module, and the like, which are not furtherdescribed herein.

In this embodiment of the present invention, the processor 680 includedin the first terminal performs the following procedure:

determining, according to a GNSS clock, a transmission timeslotcorresponding to a current moment in a D2D system; and

determining, according to the transmission timeslot and a firstparameter, whether the current moment is a synchronization informationsending moment.

The RF circuit 610 performs the following procedure:

obtaining first configuration information, where the first configurationinformation includes the first parameter; and

when the processor 680 determines that the current moment is thesynchronization information sending moment, sending sidelinksynchronization information to the first terminal at the synchronizationinformation sending moment, where the sidelink synchronizationinformation carries indication information, the sidelink synchronizationinformation is used to synchronize the second terminal with the firstterminal, and the indication information is used to indicate, to thesecond terminal, that the first terminal is a synchronization sourcethat uses the GNSS clock.

In another embodiment of this embodiment of the present invention, theRF circuit 610 is further configured to perform the following procedure:

obtaining second configuration information; and

determining, according to the GNSS clock and the second configurationinformation, the transmission timeslot corresponding to the currentmoment in the D2D communications system.

In another embodiment of this embodiment of the present invention, theprocessor 680 specifically performs the following procedure:

obtaining the second configuration information in a pre-configurationmanner; or

obtaining the second configuration information according to a presetprotocol; or

the RF circuit 610 specifically performs the following procedure:

when the first terminal is within network coverage, obtaining the secondconfiguration information by receiving system broadcast information sentby a base station; or when the first terminal is within networkcoverage, obtaining the second configuration information by receivingRRC signaling sent by a base station.

In another embodiment of this embodiment of the present invention, thesecond configuration information includes a second parameter, and theprocessor 680 specifically performs the following procedure:

determining the current moment according to the GNSS clock; and

calculating the transmission timeslot according to the current momentand the second parameter in accordance with a preset calculation rule.

In another embodiment of this embodiment of the present invention, thesecond parameter includes an initial reference moment, and the processor680 specifically performs the following procedure:

calculating a difference between the current moment and the initialreference moment; and

calculating, according to the preset calculation rule and thedifference, a frame number and a subframe number that correspond to thecurrent moment in the D2D communications system.

In this embodiment of the present invention, the RF circuit 610 includedin the second terminal performs the following procedure:

obtaining sidelink synchronization information sent by the firstterminal, where the sidelink synchronization information carriesindication information.

The processor 680 performs the following procedure:

obtaining the sidelink synchronization information sent by the firstterminal, where the sidelink synchronization information carries theindication information; and

synchronizing the second terminal with the first terminal according tothe sidelink synchronization information.

In another embodiment of this embodiment of the present invention, thesidelink synchronization information includes an SLSS, and an SLSSincludes a PSSS and an SSSS.

The processor 680 specifically performs the following procedure:

parsing the PSSS and/or the SSSS to obtain a dedicated sequence, wherethe dedicated sequence is used to indicate that the first terminal is asynchronization source that uses a GNSS clock; and determining,according to the dedicated sequence, that the first terminal is thesynchronization source that uses the GNSS clock.

In another embodiment of this embodiment of the present invention, thesidelink synchronization information further includes an MIB-SL.

The processor 680 specifically performs the following procedure:

obtaining a timeslot boundary of the first terminal according to theSLSS;

aligning a timeslot boundary of the second terminal with the timeslotboundary of the first terminal;

determining, according to the MIB-SL, a transmission timeslot that isdetermined by the first terminal according to the GNSS clock and thatcorresponds to a current moment in a device-to-device D2D system; and

aligning a transmission timeslot of the second terminal with thetransmission timeslot of the first terminal.

In another embodiment of this embodiment of the present invention, thesidelink synchronization information includes an SLSS, and an SLSSincludes a PSSS and an SSSS.

The processor 680 specifically performs the following procedure:

parsing the PSSS to obtain a first dedicated sequence, where the firstdedicated sequence is used to indicate that the first terminal is thesynchronization source that uses the GNSS clock;

determining, according to the first dedicated sequence, that the firstterminal is the synchronization source that uses the GNSS clock;

when there are multiple first terminals, parsing the SSSS to obtain asecond dedicated sequence, where the second dedicated sequence includestarget indication information, and the target indication information isused to indicate a priority of the first terminal in synchronizationsources that use the GNSS clock;

determining a synchronization source priority of each first terminalaccording to the second dedicated sequence; and

synchronizing the second terminal with a first terminal whosesynchronization source priority is the highest in the multiple firstterminals.

In another embodiment of this embodiment of the present invention, thesidelink synchronization information includes an MIB-SL.

The processor 680 specifically performs the following procedure:

parsing the MIB-SL to obtain the indication information, where theindication information is used to indicate that the first terminal isthe synchronization source that uses the GNSS clock; and

determining, according to the indication information, that the firstterminal is the synchronization source that uses the GNSS clock.

In the several embodiments provided in this application, it should beunderstood that the disclosed system, apparatus, and method may beimplemented in other manners. For example, the described apparatusembodiment is merely an example. For example, the unit division ismerely logical function division and may be other division in actualimplementation. For example, a plurality of units or components may becombined or integrated into another system, or some features may beignored or not performed. In addition, the displayed or discussed mutualcouplings or direct couplings or communication connections may beimplemented by using some interfaces. The indirect couplings orcommunication connections between the apparatuses or units may beimplemented in electronic, mechanical, or other forms.

The units described as separate parts may or may not be physicallyseparate, and parts displayed as units may or may not be physical units,may be located in one position, or may be distributed on a plurality ofnetwork units. Some or all of the units may be selected according toactual requirements to achieve the objectives of the solutions of theembodiments.

In addition, functional units in the embodiments of the presentinvention may be integrated into one processing unit, or each of theunits may exist alone physically, or two or more units are integratedinto one unit. The integrated unit may be implemented in a form ofhardware, or may be implemented in a form of a software functional unit.

When the integrated unit is implemented in the form of a softwarefunctional unit and sold or used as an independent product, theintegrated unit may be stored in a computer-readable storage medium.Based on such an understanding, the technical solutions of the presentinvention essentially, or the part contributing to the prior art, or allor some of the technical solutions may be implemented in the form of asoftware product. The software product is stored in a storage medium andincludes several instructions for instructing a computer device (whichmay be a personal computer, a server, or a network device) to performall or some of the steps of the methods described in the embodiments ofthe present invention. The foregoing storage medium includes: any mediumthat can store program code, such as a USB flash drive, a removable harddisk, a read-only memory (ROM), a random access memory (RAM), a magneticdisk, or an optical disc.

The synchronous communication method and the terminal provided in theembodiments of the present invention are described in detail above.Although the principle and implementations of the present invention aredescribed by using specific examples in this specification, thedescriptions about the embodiments are only intended to help understandthe method and core ideas of the present invention. In addition, aperson skilled in the art may make variations to the specificimplementations and application scopes according to the ideas of theembodiments of the present invention. Therefore, the content of thespecification should not be construed as a limitation to the presentinvention.

What is claimed is:
 1. A synchronous communication method, comprising:obtaining, by a first terminal, first configuration information, whereinthe first configuration information comprises a first parameter;determining, by the first terminal according to a global navigationsatellite system (GNSS) clock, a transmission timeslot corresponding toa current moment in a device-to-device (D2D) communications system;determining, by the first terminal according to the transmissiontimeslot and the first parameter, whether the current moment is asynchronization-information-sending moment; and if the current moment isthe synchronization-information-sending moment, sending, by the firstterminal, sidelink synchronization information at thesynchronization-information-sending moment, wherein the sidelinksynchronization information carries indication information, the sidelinksynchronization information is used to synchronize a second terminalwith the first terminal, and the indication information is used toindicate, to the second terminal, that the first terminal is asynchronization source that uses the GNSS clock.
 2. The method accordingto claim 1, wherein the sidelink synchronization information comprises asidelink synchronization signal (SLSS).
 3. The method according to claim2, wherein the SLSS comprises a primary sidelink synchronization signal(PSSS) and a secondary sidelink synchronization signal (SSSS), whereinat least one of the PSSS and the SSSS comprises a dedicated sequence,and wherein the dedicated sequence is the indication information.
 4. Themethod according to claim 2, wherein the sidelink synchronizationinformation further comprises a sidelink master information block(MIB-SL), and wherein the MIB-SL comprises information about thetransmission timeslot for aligning timeslots of the second terminal andthe first terminal.
 5. The method according to claim 1, wherein at leastone of the following is applied: a priority of the synchronizationsource that uses the GNSS clock is higher than a priority of asynchronization source that does not use the GNSS clock; a priority ofthe synchronization source that uses the GNSS clock is higher than apriority of a synchronization source beyond network coverage that doesnot use the GNSS clock; a priority of the synchronization source thatuses the GNSS clock is higher than a priority of a synchronizationsource beyond network coverage that does not use the GNSS clock and apriority of a cell within network coverage; and a priority of thesynchronization source that uses the GNSS clock is higher than apriority of a synchronization source beyond network coverage that doesnot use the GNSS clock but lower than a priority of a cell withinnetwork coverage.
 6. The method according to claim 1, wherein thetransmission timeslot corresponding to the current moment in the D2Dcommunications system is at least one of a frame number and a subframenumber.
 7. The method according to claim 1, wherein before thedetermining, by the first terminal according to the GNSS clock, thetransmission timeslot corresponding to the current moment in the D2Dcommunications system, the method further comprises: obtaining, by thefirst terminal, second configuration information; and wherein thedetermining, by the first terminal according to the GNSS clock, thetransmission timeslot corresponding to the current moment in thedevice-to-device (D2D) communications system comprises: determining, bythe first terminal according to the GNSS clock and the secondconfiguration information, the transmission timeslot corresponding tothe current moment in the D2D communications system.
 8. The methodaccording to claim 7, wherein the obtaining, by the first terminal, thesecond configuration information comprises at least one of: obtaining,by the first terminal, the second configuration information in apre-configuration manner; when the first terminal is within networkcoverage, obtaining, by the first terminal, the second configurationinformation by receiving system broadcast information sent by a basestation; when the first terminal is within network coverage, obtaining,by the first terminal, the second configuration information by receivingradio resource control (RRC) signaling sent by a base station; andobtaining, by the first terminal, the second configuration informationaccording to a preset protocol.
 9. The method according to claim 7,wherein the second configuration information comprises a secondparameter; and wherein the determining, by the first terminal accordingto the GNSS clock and the second configuration information, thetransmission timeslot corresponding to the current moment in the D2Dcommunications system comprises: determining, by the first terminal, thecurrent moment according to the GNSS clock; and calculating, by thefirst terminal, the transmission timeslot according to the currentmoment and the second parameter in accordance with a preset calculationrule.
 10. The method according to claim 9, wherein the second parametercomprises an initial reference moment; and wherein the calculating, bythe first terminal, the transmission timeslot according to the currentmoment and the second parameter in accordance with the presetcalculation rule comprises: calculating, by the first terminal, adifference between the current moment and the initial reference moment;and calculating, by the first terminal according to the presetcalculation rule and the difference, a frame number and a subframenumber that correspond to the current moment in the D2D communicationssystem.
 11. The method according to claim 10, wherein the first terminalcalculates the frame number DFN_(t) by using the following formula:DFN_(t)=(a*T _(duration))mod K ₁, wherein K₁ is a length of a frameperiod, T_(duration) is the difference, a is a first scale parameter,and the first scale parameter is used to align a time unit of thedifference with a frame length unit.
 12. A first terminal, comprising:at least one processor; a non-transitory computer-readable storagemedium coupled to the at least one processor and storing programminginstructions for execution by the at least one processor, theprogramming instructions instruct the at least one processor to: obtainfirst configuration information, wherein the first configurationinformation comprises a first parameter; determine, according to aglobal navigation satellite system (GNSS) clock, a transmission timeslotcorresponding to a current moment in a device-to-device (D2D)communications system; determine, according to the transmission timeslotand the first parameter, whether the current moment is asynchronization-information-sending moment; and if the current moment isthe synchronization-information-sending moment, send sidelinksynchronization information at the synchronization-information-sendingmoment, wherein the sidelink synchronization information carriesindication information, the sidelink synchronization information is usedto synchronize a second terminal with the first terminal, and theindication information is used to indicate, to the second terminal, thatthe first terminal is a synchronization source that uses the GNSS clock.13. The first terminal according to claim 12, wherein the programminginstructions further instruct the at least one processor to: obtainsecond configuration information; and determine, according to the GNSSclock and the second configuration information, the transmissiontimeslot corresponding to the current moment in the D2D communicationssystem.
 14. The first terminal according to claim 13, wherein the secondconfiguration information is obtained by at least one of the following:obtain the second configuration information in a pre-configurationmanner; when the first terminal is within network coverage, obtain thesecond configuration information by receiving system broadcastinformation sent by a base station; when the first terminal is withinnetwork coverage, obtain the second configuration information byreceiving radio resource control (RRC) signaling sent by a base station;and obtain the second configuration information according to a presetprotocol.
 15. The first terminal according to claim 13, wherein thesecond configuration information comprises a second parameter; andwherein the programming instructions further instruct the at least oneprocessor to: determine the current moment according to the GNSS clock;and calculate the transmission timeslot according to the current momentand the second parameter in accordance with a preset calculation rule.16. The first terminal according to claim 15, wherein the secondparameter comprises an initial reference moment; and wherein theprogramming instructions further instruct the at least one processor to:calculate a difference between the current moment and the initialreference moment; and calculate, according to the preset calculationrule and the difference, a frame number and a subframe number thatcorrespond to the current moment in the D2D communications system.
 17. Aterminal, comprising: at least one processor; a non-transitorycomputer-readable storage medium coupled to the at least one processorand storing programming instructions for execution by the at least oneprocessor, the programming instructions instruct the at least oneprocessor to: obtain sidelink synchronization information sent by afirst terminal, wherein the sidelink synchronization information carriesindication information; determine, according to the indicationinformation, that the first terminal is a synchronization source thatuses a global navigation satellite system (GNSS) clock; and synchronizethe terminal with the first terminal according to the sidelinksynchronization information.
 18. The terminal according to claim 17,wherein the sidelink synchronization information comprises a sidelinksynchronization signal (SLSS), and the SLSS comprises a primarysynchronization signal (PSSS) and a secondary synchronization signal(SSSS); and wherein the programming instructions further instruct the atleast one processor to: parse at least one of the PSSS and the SSSS toobtain a dedicated sequence, wherein the dedicated sequence is used toindicate that the first terminal is the synchronization source that usesthe GNSS clock; and determine, according to the dedicated sequence, thatthe first terminal is the synchronization source that uses the GNSSclock.
 19. The terminal according to claim 17, wherein the sidelinksynchronization information comprises a sidelink master informationblock (MIB-SL); and wherein the programming instructions furtherinstruct the at least one processor to: parse the MIB-SL to obtain theindication information, wherein the indication information is used toindicate that the first terminal is the synchronization source that usesthe GNSS clock; and determine, according to the indication information,that the first terminal is the synchronization source that uses the GNSSclock.
 20. The terminal according to claim 18, wherein the sidelinksynchronization information further comprises an MIB-SL, and the MIB-SLcomprises a transmission timeslot that is determined by the firstterminal according to the GNSS clock and that corresponds to a currentmoment in a device-to-device (D2D) system; and wherein the programminginstructions further instruct the at least one processor to: obtain atimeslot boundary of the first terminal according to the SLSS; align atimeslot boundary of the terminal with the timeslot boundary of thefirst terminal; determine, according to the MIB-SL, the transmissiontimeslot that is determined by the first terminal according to the GNSSclock and that corresponds to the current moment in the D2D system; andalign a transmission timeslot of the terminal with the transmissiontimeslot of the first terminal.